<template name="header">
  <div class="navbar navbar-inverse navbar-fixed-top">
    <div class="navbar-inner">
      <div class="container">
        <a class="btn btn-navbar">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </a>
        <a class="brand" href="/">Roles Example App</a>

        {{#if currentUser}}
        <div class="nav-collapse collapse">
          <ul class="nav">

            <li><a href="/start">Start Page</a></li>

            {{#if isInRole 'admin,secrets'}}
            <li><a href="/secrets">Secrets</a></li>
            {{/if}}

            <li class="dropdown pull-right">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{displayName}}<b class="caret"></b></a>
              <ul class="dropdown-menu">
                {{#if isInRole 'admin,manage-users'}}
                <li><a href="/manageUsers">Manage Users</a></li>
                {{/if}}
                <li><a class="signout" href="/signout">Sign out</a></li>
              </ul>
            </li>

          </ul>
        </div>
        {{/if}}

      </div>
    </div>
  </div>
</template>
